bitkeeper revision 1.1389.5.20 (427a4dcf057tQfMOhrkAUtc9VOgOyw)
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Thu, 5 May 2005 16:46:07 +0000 (16:46 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Thu, 5 May 2005 16:46:07 +0000 (16:46 +0000)
Remove __set_fixmap_ma and handle difference in installing machine-address
and pseudo-physical-address fixmap entries inside __set_fixmap.
fixmap.h:
  Remove __set_fixmap_ma and handle difference in installing machine-address
  and pseudo-physical-address fixmap entries inside __set_fixmap.
ioremap.c:
  Change set_fixmap_ma call to set_fixmap call.
init.c:
  Remove __set_fixmap_ma and handle difference in installing machine-address
  and pseudo-physical-address fixmap entries inside __set_fixmap.
  Change __set_fixmap_ma calls to set_fixmap calls and set_fixmap_ma_ro call
  to __set_fixmap(,, PAGE_KERNEL_RO) call.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c
linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c
linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h

index 4552b50176aba7a46e8d8a2abc3f94f374d86b8b..d50d2218e14ba1c6338356d395218548856d8ca7 100644 (file)
@@ -361,7 +361,14 @@ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
                printk("Invalid __set_fixmap\n");
                return;
        }
-       set_pte_phys(address, phys, prot, SET_FIXMAP_KERNEL);
+       switch (idx) {
+       case VSYSCALL_FIRST_PAGE:
+               set_pte_phys(address, phys, prot, SET_FIXMAP_KERNEL);
+               break;
+       default:
+               set_pte_phys_ma(address, phys, prot);
+               break;
+       }
 }
 
 
@@ -414,18 +421,6 @@ void __set_fixmap_user (enum fixed_addresses idx, unsigned long phys, pgprot_t p
 
 }
 
-
-void __set_fixmap_ma (enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
-{ 
-       unsigned long address = __fix_to_virt(idx);
-
-       if (idx >= __end_of_fixed_addresses) {
-               printk("Invalid __set_fixmap\n");
-               return;
-       }
-       set_pte_phys_ma(address, phys, prot);
-}
-
 unsigned long __initdata table_start, table_end, tables_reserved; 
 
 #if 0
@@ -632,8 +627,7 @@ void __init paging_init(void)
                free_area_init(zones_size);
        }
 
-        __set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info, 
-                        __pgprot(_KERNPG_TABLE));
+        set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
         HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
 
         memset(empty_zero_page, 0, sizeof(empty_zero_page));
@@ -642,11 +636,11 @@ void __init paging_init(void)
         /* Setup mapping of lower 1st MB */
         for (i = 0; i < NR_FIX_ISAMAPS; i++)
                 if (xen_start_info.flags & SIF_PRIVILEGED)
-                        __set_fixmap_ma(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE,
-                                __pgprot(_KERNPG_TABLE));
+                        set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
                 else
-                        set_fixmap_ma_ro(FIX_ISAMAP_BEGIN - i,
-                                         virt_to_machine(empty_zero_page));
+                        __set_fixmap(FIX_ISAMAP_BEGIN - i,
+                                    virt_to_machine(empty_zero_page),
+                                    PAGE_KERNEL_RO);
 #endif
 
 }
index 1ac88b5e08c3617bacc24dda1c8dce0efed4b310..3714880f7203daf5e3b89df51152363f0382483d 100644 (file)
@@ -273,7 +273,7 @@ void __init *bt_ioremap(unsigned long phys_addr, unsigned long size)
         */
        idx = FIX_BTMAP_BEGIN;
        while (nrpages > 0) {
-               set_fixmap_ma(idx, phys_addr);
+               set_fixmap(idx, phys_addr);
                phys_addr += PAGE_SIZE;
                --idx;
                --nrpages;
index 1947a095447bb3170d09272d68af1ab28a0dc609..4c420f01eeeec68d718a84a7d25e9b0f41a567ec 100644 (file)
@@ -60,22 +60,13 @@ enum fixed_addresses {
 extern void __set_fixmap (enum fixed_addresses idx,
                                        unsigned long phys, pgprot_t flags);
 
-extern void __set_fixmap_ma (enum fixed_addresses idx,
-                                       unsigned long mach, pgprot_t flags);
-
 #define set_fixmap(idx, phys) \
                __set_fixmap(idx, phys, PAGE_KERNEL)
-
-#define set_fixmap_ma(idx, phys) \
-               __set_fixmap_ma(idx, phys, PAGE_KERNEL)
-#define set_fixmap_ma_ro(idx, phys) \
-               __set_fixmap_ma(idx, phys, PAGE_KERNEL_RO)
-
 /*
  * Some hardware wants to get fixmapped without caching.
  */
 #define set_fixmap_nocache(idx, phys) \
-               __set_fixmap_ma(idx, phys, PAGE_KERNEL_NOCACHE)
+               __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
 
 #define clear_fixmap(idx) \
                 __set_fixmap(idx, 0, __pgprot(0))